package com.bop.dehong.center.transaction;

import java.util.ArrayList;
import java.util.List;

import android.support.v4.app.Fragment;
import android.view.View;

import com.bop.dehong.R;
import com.bop.dehong.base.TopManager;
import com.bop.dehong.center.transaction.fragment.ChargeRecord;
import com.bop.dehong.center.transaction.fragment.TransactionRecord;
import com.bop.dehong.center.transaction.fragment.WithdrawRecord;
import com.bop.dehong.main.BottomBarActivity;


public class TransactionActivity extends BottomBarActivity {
	
	private List<Fragment> mFragments = new ArrayList<Fragment>();
	
	private TransactionRecord transactionRecord;
	private ChargeRecord chargeRecord;
	private WithdrawRecord withdrawRecord;
	
	@Override
	protected List<Fragment> getFragments() {
		return mFragments;
	}

	@Override
	protected List<View> getBottomViews() {
		// TODO Auto-generated method stub
		List<View> bottoms = new ArrayList<View>();
		bottoms.add(getView(R.id.transaction_record));
		bottoms.add(getView(R.id.charge_record));
		bottoms.add(getView(R.id.withdraw_record));
		return bottoms;
	}

	@Override
	protected void initTop() {
		// TODO Auto-generated method stub
		super.initTop();
		View mView = getView(R.id.transaction_top);
		TopManager manager = new TopManager(mView);
		manager.setTitle("交易记录");
		manager.setLeftImageVisibility(View.VISIBLE);
	}
	
	@Override
	protected void initFragments() {
		transactionRecord = new TransactionRecord();
		chargeRecord = new ChargeRecord();
		withdrawRecord = new WithdrawRecord();
		
		mFragments.add(transactionRecord);
		mFragments.add(chargeRecord);
		mFragments.add(withdrawRecord);
	}

	
	@Override
	protected int getContentViewId() {
		return R.layout.transaction_top_bar;
	}	
}
